package com.suntek.svn.service;

import java.io.File;

import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.ISVNInfoHandler;
import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.SVNInfo;
import org.tmatesoft.svn.core.wc.SVNRevision;

public class SvnInfoTest implements ISVNInfoHandler {

	public static void main(String args[]) {
		try {
			SVNInfo info = SVNClientManager.newInstance().getWCClient().doInfo(
					new File("D:/SvnRepositories/study"), SVNRevision.HEAD);
			System.out.println("Local Path: " + info.getFile().getPath());
			System.out.println("URL: " + info.getURL());
			System.out.println("Last Changed Author: " + info.getAuthor());
			System.out.println("Last Changed Revision: "
					+ info.getCommittedRevision().getNumber());
			System.out.println("Last Changed Date: " + info.getCommittedDate());

		} catch (SVNException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public void handleInfo(SVNInfo arg0) throws SVNException {

	}

}
